<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserLoginLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_login_log', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("user_id")->default(0)->comment("用户ID");
            $table->integer("login_way")->default(0)->comment("登录方式 1微信登录 2手机验证码登录 3 密码登录 4 手机号一键登录 5微信自动登录");
            $table->string("app_platform",20)->default('')->comment('登录平台');
            $table->string("app_name",20)->default('')->comment('APP名称');
            $table->string("app_version",20)->default('')->comment("APP版本");
            $table->string("login_ip",20)->default('')->comment("登陆IP");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_login_log');
    }
}
